//-----------------------------------------------------------------------
//<copyright file="ChiTietPhieuXuatDAO.cs
//Code generate by tools.
//</copyright>
//-----------------------------------------------------------------------

using System;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using PMS.Exceptions;
using System.Data.SqlClient;
using PMS.Entity;

namespace PMS.DAL
{
    public class CongNoCuaKhachHangDAO : SQLDatabase, PMS.DAL.ICongNoCuaKhachHangDAO
	{

		#region Select methods

		#region GetAll ChiTietPhieuXuat methods

        public CongNoCuaKhachHangs GetAllCongNoCuaKhachHang(int songay)
        {
            try
            {

                SqlCommand command = SQLDatabase.StoredProcedureCommand("spDanhSachKhachHangConNo");
                AddInParameter(command, "@songay", SqlDbType.Int, songay);
                CongNoCuaKhachHangs Result = new CongNoCuaKhachHangs();
                List<CongNoCuaKhachHang> List = ExecuteQuery<CongNoCuaKhachHang>(command, true);
                foreach (CongNoCuaKhachHang item in List)
                {
                    Result.Add(item);
                }
                return Result;
            }
            catch (Exception ex)
            {
                throw DataAccessException.GetException("Data Access GetAllChiTietPhieuXuatException", ex);
            }
        }
		#endregion

		#endregion
	}
}//End Class
